#ifndef _DEFINE__
#define _DEFINE__

	int map_posX = 2;
	int map_posY = 2; 
	const int KEY_UP = 72;
	const int KEY_DOWN = 80;
	const int KEY_LEFT = 75;
	const int KEY_RIGHT = 77;
	const int KEY_ESC = 27;
	const int KEY_S = 115;
	int map_w,map_h;
	int *map = new int[map_w * map_h];

	const int hidden = 1 << 1;

	const int typeTank = 0;
	const int typeBullet = 1;

	int frame = 0;

	class cActor
	{
		private:
			int pos_x;
			int pos_y;
			int direction;
			int type;
			int flag;

		public:
			cActor(int posX, int posY, int type, int dir)
			{
				this->pos_x = posX;
				this->pos_y = posY;
				this->type = type;
				this->direction = dir;
				flag = 1;
			};
			void draw();
			void delete_blocks(int x,int y);
			void move(int direction);
			void shot();
			bool canMove(int direction);
			void update();
			void addFlag(int value);
			void removeFlag(int value);
			bool hasFlag(int value);
	};

	std::vector<cActor> cv;
	void drawblocks(int a[],int w,int h,int x,int y);
	void delete_cache();
	void Game_Run();
	void delete_blocks(int *a,int w,int h,int x,int y);
	BOOL textout(int x,int y, LPTSTR lpszString);
	HANDLE initiate();
	void clearScreen();
	void load_Map();
	void draw_Map();
	boolean isDirKey(int key);

#endif